Automatic focusing apparatus and lens apparatus including the automatic focusing apparatus

ABSTRACT

An automatic focusing apparatus includes: a focus lens unit; a focus driver; a first focus detector that detects an in-focus state based on a phase difference; a second focus detector that detects an in-focus state using a signal from an image pickup element; a focus controller that controls the focus driver to perform focusing based on a first focus detection result and a second focus detection result; a movement detector that detects a movement of an object with components in a direction perpendicular to an optical axis based on an image signal obtained from the first focus detector; and a re-execution determination unit that determines whether to control the focus driver to re-execute focusing based on the first focus detection result and the second focus detection result that are newly detected after the execution of focusing and based on a movement detection result detected by the movement detector.

This application is a U.S. National Phase Application of PCTInternational Application PCT/JP2011/078979 filed on Dec. 8, 2011, whichis based on and claims priority from JP 2010-281466 filed on Dec. 17,2010, the contents of both of these documents are hereby incorporated inby reference in their entireties.

TECHNICAL FIELD

The present invention relates to an automatic focusing apparatus, andparticularly, to an automatic focusing apparatus used in a still camera,a TV camera, and a video camera and a lens apparatus including theautomatic focusing apparatus.

BACKGROUND ART

Conventionally, there are various proposals related to an automaticfocusing technique used in a still camera, a TV camera, and a videocamera.

For example, contrast based automatic focusing (hereinafter “contrastAF”) is proposed, in which high frequency components of the image pickedup by a picked up image element is extracted and the focus position iscontrolled by maximizing an evaluation value corresponding to thesharpness of the image to perform focusing. In the contrast AF, a searchoperation, that is, changing the position of the focus lens, is requiredto determine the direction of the movement of the focus lens where theevaluation value corresponding to the contrast of the image relative tothe focus position is the maximum and to determine the maximum point. Itis known that the focusing accuracy of the contrast AF is high, becausefocusing is determined using an image signal obtained based on an outputsignal from the image pickup element that picks up an image of anobject.

So-called external measuring AF is also proposed, in which a distancemeasuring sensor is arranged independently from an image pickup lens,and the in-focus position of the focus lens is calculated from anobtained object distance to control the focus lens to perform focusing.Phase difference system automatic focusing (hereinafter, “phasedifference AF”) is also proposed, in which a split optical system splitsa beam passed through an image pickup lens, an in-focus state withrespect to the object is detected from the split beams, and focusing isperformed based on the result.

Among these, in the external measuring AF and the phase difference AF,the beam from the object is divided into two beams in an in-focus statedetecting apparatus to form two images on sensors. Correlation computingis applied to photoelectrically converted signals of two images todetect the phase difference. A defocus amount and an object distance arecalculated from the phase difference, and the defocus amount and theobject distance are converted to a drive target position of the focuslens to control the focus lens to perform focusing.

In the external measuring AF and the phase difference AF, it is knownthat there is no need to perform a search operation performed in thecontrast AF, and the focusing speed is fast.

To utilize the high focusing accuracy of the contrast AF and the highfocusing speed of the external measuring AF and the phase difference AF,a hybrid AF system in which a combination of the contrast AF andexternal measuring AF and phase difference AF is further proposed.

To maintain the in-focus state with respect to the target object byautomatic focusing, an automatic focusing operation needs to be executedevery time the object distance changes to cause the object being out offocus.

In the automatic focusing apparatus including only the contrast AF, ifthe evaluation value of the contrast AF for an object for which afocusing operation was once performed to obtain an in-focus state,decreases by a value greater than a predetermined value, an automaticfocusing operation is executed again (hereinafter, focusing operationexecuted again after focusing will be described as “re-executionoperation”).

In this case, if the object moves without involving a change in theobject distance, such as when the object moves in a parallel direction(horizontal direction) relative to the imaging plane or when panningoperation is performed, the evaluation value of the contrast AF mayreduces when the object is moving while the object is in in-focus state.

Therefore, based only on the condition that the contrast AF evaluationvalue reduces by more than a predetermined value, it is difficult todetermine whether the object distance is changed or the object has movedwithout involving a change in the object distance. The re-executionoperation of AF that would not be necessary if the object is in in-focusstate is executed, and it is significantly uncomfortable to view thepicked up image if a search operation is performed.

For example, Japanese Patent Application Laid-Open No. 2007-174521discloses a technique of using a blur detector to detect a change in thecomposition and controlling not to perform the focus adjustment duringthe change in the composition. When there is a change in the compositionduring shooting of a video, such as by panning, unstable focusing causedby the AF following the change in the distance status of the object inthe screen can be prevented.

In the conventional technique disclosed in Japanese Patent ApplicationLaid-Open No. 2007-174521, the AF is terminated during the detection ofthe change in the composition. Therefore, unstable focusing can beprevented as described above when there is panning.

However, when the object moves parallel to the imaging plane instead ofthe change in the composition, the AF search may be performed and thefocus may become unstable if the contrast AF evaluation value reducesduring the movement of the object, because the change in the compositionis not detected.

An object of the present invention is to provide an automatic focusingapparatus that can attain both the stability and the followability in AFby appropriately executing an AF re-execution operation when there is amovement of an object or a change in a composition.

CITATION LIST Patent Literature

-   PTL 1: Japanese Patent Application Laid-Open No. 2007-174521

SUMMARY OF INVENTION

An automatic focusing apparatus of the present invention includes: afocus lens unit; a focus driver that drives the focus lens unit; a firstfocus detector that detects an in-focus state based on a phasedifference; a second focus detector that detects an in-focus state usinga signal from an image pickup element; a focus controller that controlsthe focus driver to perform focusing based on a first focus detectionresult detected by the first focus detector and a second focus detectionresult detected by the second focus detector; a movement detector thatdetects a movement of an object with components in a directionperpendicular to an optical axis based on an image signal obtained fromthe first focus detector; and a re-execution determination unit thatdetermines whether to control the focus driver to re-execute focusingbased on the first focus detection result and the second focus detectionresult that are newly detected after the execution of focusing and basedon a movement detection result detected by the movement detector.

The present invention can provide an automatic focusing apparatus thatcan attain both the stability and the followability in automaticfocusing.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating a configuration of an automaticfocusing apparatus according to an embodiment.

FIG. 2 is a diagram for describing a concept of phase differencedetection using external measuring sensors.

FIG. 3 is a flow chart for describing a focusing operation according tothe embodiment.

FIG. 4 is a flow chart for describing a process of external measuring AFaccording to the embodiment.

FIG. 5 is a flow cart for describing a process of contrast AF accordingto the embodiment.

FIG. 6 is a flow chart for describing a process of AF re-executiondetermination (a contrast AF evaluation value and an external measuringAF result) according to the embodiment.

FIG. 7 is a flow chart for describing a process of parallel movementdetection of an object according to the embodiment.

FIG. 8 is a diagram for describing a principle of the parallel movementdetection according to the embodiment.

FIG. 9 is a flow chart for describing a process of AF re-executiondetermination (only the contrast AF evaluation value) according to theembodiment.

DESCRIPTION OF EMBODIMENTS

Preferred embodiments of the present invention will now be described indetail in accordance with the accompanying drawings.

FIG. 1 is a block diagram illustrating a configuration of an automaticfocusing apparatus according to the embodiment of the present invention.In FIG. 1, the automatic focusing apparatus of the present inventionincludes a lens apparatus 100 and a camera apparatus 200.

The lens apparatus 100 includes a focus driver including a focus lensunit 111, a focus motor 112, a driver 113, and a focus position detector114. The focus motor 112 driven by the driver 113 moves the focus lensunit 111 in an optical axis direction. The focus position detector 114detects the position of the focus lens unit 111.

The sensor imaging lenses 121 are arranged at positions independent froman optical system where the beam entering an image pickup element 201described later passes through. The beam that has entered the sensorimaging lenses 121 is divided into two beams, and a pair of images(hereinafter, called “two images”) are formed on the external measuringsensors 122. The external measuring sensors 122 photoelectricallyconvert the formed two images and output two image signals.

FIG. 2 illustrates a conceptual diagram of phase difference detectionand object distance calculation using the sensor imaging lenses 121 andthe external measuring sensors 122. The sensor imaging lenses 121include a pair of lenses 121-1 and 121-2, and the external measuringsensors 122 include a pair of area sensors 122-1 and 122-2. A baselength of the external measuring sensors 122 is designated with B, afocal length of the sensor imaging lenses 121 is designated with f, anda phase difference between image signals formed on the area sensors122-1 and 122-2 is designated with P. An object distance L, which is adistance from the object to the sensor imaging lenses 121, can becalculated by Expression (1).L=f×B/P  (1)

Returning to the description of FIG. 1, the lens apparatus 100 includesa CPU 130, and the CPU 130 includes a sensor controller 131, a phasedifference detector 132, a movement detector 133, a controller 134, acontrast detector 135, a lens controller 136, and a memory 137 describedlater.

The sensor controller 131 controls the external measuring sensors 122,obtains two image signals from the external measuring sensors 122, andoutputs waveforms of two images (waveforms expressed by signals of twoimages). Based on the waveforms of two images output by the sensorcontroller 131, the phase difference detector 132 performs correlationcomputing to calculate the phase difference to calculate the objectdistance based on Expression (1).

In the automatic focusing apparatus of the present invention, the sensorimaging lenses 121, the external measuring sensors 122, the sensorcontroller 131, and the phase difference detector 132 constitute a firstfocus detector (external measuring AF mechanism) of a phase differencedetection system, and the contrast detector 135 constitutes a secondfocus detector of a contrast system.

Based on the waveforms of two images, the movement detector 133 detects(determines) whether the object has moved with components in a directionperpendicular to the optical axis of the external measuring sensors 122.The movement of the object with components in a direction perpendicularto the optical axis of the external measuring sensors 122 denotes amovement of the object with components in a direction parallel to theimaging plane in a normal case in which the imaging plane is arrangedperpendicular to the optical axis. The present embodiment describes acase in which the object moves with components in a horizontal directionof the imaging plane perpendicular to the optical axis (hereinafter, themovement is referred to as “parallel movement”). A method of detectingthe parallel movement of the object will be described later.

The controller 134 serving as a focus controlling unit outputs a commandvalue to the lens controller 136 for driving the focus lens unit 111described later based on an object distance (first focus detectionresult) obtained from the phase difference detector 132 and a contrastAF evaluation value (second focus detection result) obtained from thecontrast detector 135 described later.

The camera apparatus 200 includes the image pickup element 201 and animage processor 202. The image pickup element 201 receives a beam passedthrough the optical system including the focus lens unit 111 andphotoelectrically converts and outputs the beam. The image processor 202converts the photoelectrically converted signal to an image signal andoutputs the image signal to the lens apparatus 100.

The contrast detector 135 of the lens apparatus 100 obtains the imagesignal from the image processor 202 of the camera apparatus 200. Thecontrast detector 135 further extracts high frequency components fromthe obtained image signal to calculate a contrast AF evaluation valueused to determine the focus. The lens controller 136 moves the focuslens unit 111 to the target position in the optical axis directionthrough the driver 113 and the focus motor 112.

The memory 137 stores information necessary for the controller 134(re-execution determination unit) to determine whether to perform are-execution operation of AF, such as the waveforms of two imagesobtained from the external measuring sensors 122, the object distanceobtained by the phase difference detector 132, the contrast AFevaluation value obtained by the contrast detector 135, and the focusposition.

A flow of a series of AF operations of the automatic focusing apparatusaccording to the present embodiment will be described with reference toflow charts and drawings of FIG. 3 and subsequent drawings. FIG. 3illustrates a flow of processes of the AF operations according to thepresent embodiment. The CPU 130 controls the processes according to acomputer program stored in a memory not illustrated. When the power ofthe lens apparatus 100 is turned on, the CPU 130 executes the processesfrom step S110. The automatic focusing apparatus according to thepresent embodiment attains an in-focus state for the target object byway of steps S110 to S170. If it is determined that re-execution of theAF operation is necessary in step S190 or S200, the process is executedagain from step S110.

Hereinafter, the processes will be sequentially described.

In step S110, the controller 134 initializes the information necessaryfor re-execution determination, such as the waveforms of two images ofthe external measuring AF, the object distance, the contrast AFevaluation value, and the focus position, stored in the memory 137.

In step S120, the external measuring AF mechanism calculates the focustarget position. External measuring target position calculation of stepS120 will be described with reference to the flow chart of FIG. 4.

In step S121 of FIG. 4, the phase difference detector 132 calculates thephase difference by correlation computing based on the obtainedwaveforms of two images. At this point, waveforms of two images W1 arestored in the memory 137.

In the correlation computing, a coincidence between two imagesindicating a degree of coincidence between image shapes of the waveformsof two images is taken into consideration. The coincidence between twoimages is obtained in the process of the correlation computing. Thelarger the coincidence between two images is, the higher the reliabilityof the correlation computation result is.

Therefore, if an external measuring AF reliability value is greater thana predetermined value, the correlation computation result is reliable.If the external measuring AF reliability value is smaller than thepredetermined value, the correlation computation result is not reliable.In the present embodiment, the coincidence between two images will becalled an external measuring AF reliability value. The first focusdetector outputs the external measuring AF reliability value, thewaveforms of two images, and the object distance as the first focusdetection result which is information which relates to the in-focusstate detection.

In step S122, if the external measuring AF reliability value is greaterthan the predetermined value, the process proceeds to step S123. If theexternal measuring AF reliability value is equal to or smaller than thepredetermined value, the focus target position based on the externalmeasuring AF is not calculated, and the process proceeds to step S130 ofFIG. 3.

In step S123, the phase difference detector 132 calculates an objectdistance D1 of the object, not illustrated, by Expression (1) based onthe phase difference.

In step S124, the controller 134 calculates a focus target position Ptcorresponding to the object distance D1 calculated in step S123. Thefocus target position is obtained using the object distance D1calculated in step S123 and a table stored in a program not illustrated.The controller 134 stores the object distance D1 in the memory 137. Theprocess then proceeds to step S130 of FIG. 3.

The process proceeds to step S130 of FIG. 3, and if the externalmeasuring AF reliability value is greater than the predetermined value,the process proceeds to step S140. In step S140, an external measuringAF_OK flag is set to ON indicating that the external measuring AF isreliable, and the process proceeds to step S160.

If the external measuring AF reliability value is equal to or smallerthan the predetermined value in step S130, the process proceeds to stepS150. The external measuring AF_OK flag is set to OFF, and the processproceeds to step S170.

In step S160, the lens controller 136 drives the focus lens unit 111 tothe focus target position Pt obtained in step S124 through the driver113 and the focus motor 112.

In step S170, a focusing operation by the contrast AF is performed. Thecontrast AF of step S170 will be described with reference to the flowchart of FIG. 5.

In step S171, the controller 134 performs, at the current focusposition, a wobbling operation, that is, an operation in which the focusposition is moved to the near side direction and to the infinitydirection, to determine the driving direction of the focus lens unit 111in which the contrast AF evaluation value becomes large.

In step S172, the focus target position is updated to a positionseparated by a predetermined sampling interval.

In S173, the lens controller 136 drives the focus lens unit 111 towardthe focus target position obtained in step S172.

In step S174, the contrast detector 135 extracts high frequencycomponents from the image signal obtained from the image processor 202to calculate the contrast AF evaluation value.

In step S175, whether the contrast AF evaluation value obtained in stepS174 is the maximum value is determined. Steps S171 to S175 areso-called hill-climbing detection, and the search operation is repeateduntil the maximum value is detected.

If the maximum value is detected in step S175, the process proceeds tostep S176. In step S176, the lens controller 136 drives the focus lensunit 111 to the focus position where the maximum value is indicated. Thefocus position serves as the in-focus point.

In step S177, the controller 134 stores an in-focus contrast AFevaluation value V1 in the memory 137. The process then proceeds to stepS180.

In step S180, the controller 134 proceeds to a re-executiondetermination 1 of step S190 if the external measuring AF_OK flag storedin the memory 137 is ON and proceeds to a re-execution determination 2of step S200 if the external measuring AF_OK flag is OFF.

If it is determined that the re-execution of the AF operation isnecessary in step S190 or S200 based on a newly detected object distance(first focus detection evaluation value) and a contrast AF evaluationvalue (second focus detection evaluation value) after the adjustment offocus and focusing of the object in step S170, the process is executedagain from step S110.

The re-execution determination 1 of step S190 will be described using aflow chart of FIG. 6.

In step S191, the contrast detector 135 executes the same process as instep S174 and calculates a contrast AF evaluation value Vnow.

In step S192, the controller 134 compares the in-focus contrast AFevaluation value V1 stored in step S177 of FIG. 5 with the contrast AFevaluation value Vnow calculated in step S191, and if the difference(variation amount) between V1 and Vnow is equal to or smaller than athreshold value ThV1 (equal to or smaller than the first predeterminedvalue), the process returns to step S191. It is determined at this pointthat there is no change in the position of the object from when theobject is focused in step S180. If the difference between V1 and Vnow isgreater than the threshold value ThV1, the process proceeds to stepS193.

The threshold value ThV1 is a threshold value for determining, for theobject focused in step S176, that there is a possibility that the objectis out of focus, and it is desirable that the threshold value ThV1 be arelative value with respect to V1, such as 20% of the contrast AFevaluation value V1 in the in-focus state. An appropriate value may beset in each case for the threshold value ThV1 according to the imagingenvironment, or a fixed value may be written in a program in advance andused.

In step S193, the phase difference detector 132 executes the sameprocess as in step S121 based on the waveforms of two images obtainedthrough the external measuring sensors 122 and the sensor controller 131and calculates the phase difference by correlation computing. At thispoint, waveforms of two images Wnow are stored in the memory 137.

In step S194, the phase difference detector 132 executes the sameprocess as in step S123 and calculates an object distance Dnow from thephase difference.

In step S195, the controller 134 compares the object distance D1 in thein-focus state by the external measuring AF stored in step S123 with theobject distance Dnow calculated in step S194. If the absolute value ofthe difference (variation amount) between D1 and Dnow is greater than athreshold value ThD (second predetermined value), it is determined thatthe re-execution of AF is necessary, and the process returns to stepS110 of FIG. 3. The process is executed when the object moves, theobject distance changes, and the focus state becomes out of focus.

If the absolute value of the difference between D1 and Dnow is equal toor smaller than the threshold value ThD (equal to or smaller than thesecond predetermined value), it is determined that the object distanceis not changed or that the change in the object distance is within thefocusing range, and the process proceeds to step S196.

The threshold value ThD is a distance from the position of the object tothe edge of the depth of field beyond which the object would be out offocus. An appropriate value may be set each time for the threshold valueThD according to the depth of field determined from the focal length, anaperture value, and the like of the optical system not illustrated, or afixed value may be written in a program in advance and used.

In step S196, the movement detector 133 detects whether the object hasmoved with components parallel to the imaging plane (hereinafter,described as “parallel movement detection”) from step S121 to step S193based on the waveforms of two images W1 stored in step S121 and thewaveforms of two images Wnow stored in step S193.

The parallel movement detection of step S196 will be described withreference to FIGS. 7 and 8.

In step S1961 of FIG. 7, an index (coordinates) Idx_W1 of a pixelindicating the maximum value of the brightness level in the waveforms oftwo images W1 stored in step S122 is calculated.

In step S1962, an index Idx_Wnow of a pixel indicating the maximum valueof the brightness level in the waveforms of two images Wnow obtained instep S193 is calculated.

(a) of FIG. 8 illustrates the waveforms of two images W1 in step S121 ofFIG. 3. (b) of FIG. 8 illustrates the waveforms of two images Wnow ofthe object moving to the right without involving a change in the objectdistance in step S193. Only one of the waveforms of two images isillustrated. The vertical axis indicates the brightness level, and thehorizontal axis indicates pixels of the external measuring sensors.

In step S1963, the indices of the pixels obtained in steps S1961 andS1962 are compared. As a result of the comparison, if there is adifference between Idx_W1 and Idx_Wnow as in FIG. 8, the processproceeds to step S1964, and a parallel movement flag is set to ON. Onthe other hand, if Idx_W1 and Idx_Wnow are equal, the process proceedsto step S1965, and the parallel movement flag is set to OFF. The processthen proceeds to step S197 of FIG. 6.

If the parallel movement flag is ON in step S197 of FIG. 6, the processreturns to step S191, and the re-execution determination 1 is executedagain. For example, the process is executed while the object is movingin a direction not involving a change in the object distance.

If the parallel movement flag is OFF in step S197, the process proceedsto step S198.

In step S198, the controller 134 compares the contrast AF evaluationvalue V1 stored in step S177 of FIG. 3 with the contrast AF evaluationvalue Vnow obtained in step S191.

If the difference (variation amount) between V1 and Vnow is equal to orsmaller than a threshold value ThV2 (equal to or smaller than a thirdpredetermined value) that is greater than the threshold value ThV1, theprocess returns to step S191, and the re-execution determination 1 isexecuted again. For example, the process is executed when the brightnessof the object or the brightness of the surrounding is reduced while theposition of the object is not changed.

On the other hand, if the difference between V1 and Vnow is greater thanthe threshold value ThV2, it is determined that the imaging scene ischanged and that the situation is changed from when the object isfocused in step S180 (change in the composition is finished), and theprocess returns to step S110 of FIG. 3 to re-execute the AF. In general,the contrast AF evaluation value often significantly decreases when theimaging scene is changed. The value of the threshold value ThV2 needs tobe a value greater than the threshold value ThV1 to detect the change inthe imaging scene and the change in the imaging target object(completion of the change in the composition).

A flow of the process when the process proceeds to the re-executiondetermination 2 of step S200 will be described with reference to a flowchart of FIG. 9. Since the external measuring AF reliability valuedecreases when the contrast of the object is low, only the contrast AFevaluation value is used to perform the re-execution determination by aknown method. An example will be described here.

In step S201 of FIG. 9, the contrast detector 135 calculates thecontrast AF evaluation value. The same process as in step S174 isexecuted to calculate the contrast AF evaluation value Vnow.

In step S202, the controller 134 compares the in-focus contrast AFevaluation value V1 stored in step S177 of FIG. 3 with the contrast AFevaluation value Vnow calculated in step S201. If the difference betweenV1 and Vnow is greater than a threshold value ThV3 in step S202, theprocess proceeds to step S203.

In step S203, a counter i for counting the number of times that thedifference between V1 and Vnow has exceeded the threshold value isincremented. It is desirable that the threshold value ThV3 be a valueequal to the threshold value V1 described above.

In step S205, whether the number of times the difference has exceededthe threshold value is greater than a predetermined number of times isdetermined. If the number is greater than the predetermined number oftimes, it is determined that the object is completely out of focus orthat the imaging scene is changed (change in the composition isfinished). The process returns to step S110 of FIG. 3 to perform there-execution of the AF.

On the other hand, if the number is not over the predetermined number oftimes, it is determined that the composition is being changed, and theprocess proceeds to step S206.

In step S206, if the difference between V1 and Vnow is greater than athreshold value ThV4 (>ThV3), the process returns to step S110 of FIG. 3to perform the re-execution of the AF regardless of the number of timesthe difference between V1 and Vnow has exceeded the threshold value.

On the other hand, if the difference between V1 and Vnow is equal tosmaller than the threshold value ThV4, the process returns to step S201,and the process of the re-execution determination 2 is executed again.The threshold value ThV4 is a threshold value for determining that theobject focused in step S176 is completely out of focus or that theimaging scene is changed (change in the composition is finished). Thethreshold value ThV4 needs to be a value greater than the thresholdvalue ThV3.

In step S202, the controller 134 compares the contrast AF evaluationvalue V1 stored in step S170 of FIG. 3 with the contrast AF evaluationvalue Vnow calculated in step S201. If the difference is equal to orsmaller than the threshold value ThV3, the process proceeds to step S204to clear i. The process returns to step S201 to execute the process ofthe re-execution determination 2 again.

As described, according to the present embodiment, the re-execution ofthe AF can be immediately performed when the object distance is changedand the target object becomes out of focus after the object is focused.

Even when the contrast AF evaluation value decreases due to panning ofthe image pickup apparatus in addition to when the object moves withoutinvolving a change in the object distance, unstable focusing caused by asearch operation can be prevented by continuing the re-executiondetermination process of the AF if the in-focus state is maintained.

Furthermore, according to the present embodiment, whether to perform there-execution operation of the AF is determined by comparing threeelements, the change in the contrast AF evaluation value, the change inthe object distance, and the parallel movement, with those when theobject is in focus. More specifically, the object distance of the AF,the contrast AF evaluation value, and the like are also detected duringthe re-execution determination. The detection system is alwaysoperating, and the re-execution operation can be immediately performedif the re-execution of the AF is necessary.

In this way, an automatic focusing apparatus that can attain both thestability and the followability in the AF can be provided.

As for the setting method of the threshold values ThV1, ThV2, and ThDdescribed in the present embodiment, the threshold values may beautomatically set based on the external measuring target positioncalculation of step S120 or the results of computation performed in thecontrast AF focusing operations of step S170, or arbitrary values may beable to be set from the outside. Enabling to arbitrarily set thethreshold values allows flexibly changing the threshold values inaccordance with imaging conditions, such as indoor image pickup, outdoorimage pickup, and night time image pickup, as well as features of aconnected image pickup apparatus, and picking up image in excellentconditions can be realized.

In the present embodiment, although the indices of the pixels with themaximum values of brightness level indicated by the waveforms in thewaveforms of two images W1 stored in step S121 and the waveforms of twoimages Wnow stored in step S193 are compared in the method of parallelmovement detection in the description, the following method may be used.

For example, indices (coordinates) of pixels at the centers of gravityof the waveforms in the waveforms of two images W1 stored in step S121and the waveforms of two images Wnow stored in step S193 may becompared.

For example, when there is a phase difference as a result of correlationcomputing of W1 and Wnow illustrated in FIG. 8, it may be determinedthat the object has moved parallel. More specifically, it can bedetermined that the object has moved parallel when a phase difference isobtained as a result of correlation computing of waveforms at aplurality of different times. In this way, the parallel movement can behighly accurately detected even if the image shapes of W1 and Wnow donot completely match each other.

In the present embodiment, although the driving direction of the focuslens unit 111 is determined by the wobbling operation in step S171 ofFIG. 5, the driving direction may be determined based on the focustarget position Pt calculated in step S124 of FIG. 4.

Although the power of the lens apparatus 100 is turned on, and anin-focus state for the target object is obtained through steps S110 toS180 of FIG. 3 in the description of the present embodiment, the presentinvention is not limited to the processing procedure and the processingcontent. The in-focus state for the target object may be obtained onlyby the contrast AF or only by the external measuring AF. Morespecifically, a method of obtaining, when the object is focused, theobject distance D1, the contrast AF evaluation value V1, and thewaveforms of two images W1, which are values necessary for there-execution determination 1 of step S190 and the re-executiondetermination 2 of step S200, can be adopted.

In the present embodiment, an example of the object moving to the rightwithout involving a change in the object distance is illustrated in FIG.8, a movement of the object moving in the vertical direction may also bedetected depending on the angle of attaching the external measuringsensors 122.

Although an example of configuration based on the external measuring AF(non-TTL phase difference AF) is illustrated in the present embodiment,the same advantageous effects can be obtained in a configuration basedon TTL phase difference AF.

Although the exemplary embodiment of the present invention has beendescribed, the present invention is not limited to the embodiment, andvarious modifications and changes can be made within the scope of thepresent invention.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2010-281466, filed Dec. 17, 2010, which is hereby incorporated byreference herein in its entirety.

The invention claimed is:
 1. An automatic focusing apparatus comprising:a focus lens unit; a focus driver that drives the focus lens unit; afirst focus detector that detects an in-focus state based on a phasedifference; a second focus detector that detects an in-focus state usinga signal from an image pickup element; a focus controller that controlsthe focus driver to perform focusing based on a first focus detectionresult detected by the first focus detector and a second focus detectionresult detected by the second focus detector; a movement detector thatdetects a movement of an object with components in a directionperpendicular to an optical axis based on an image signal obtained fromthe first focus detector; and a re-execution determination unit thatdetermines whether to control the focus driver to re-execute focusingbased on the first focus detection result and the second focus detectionresult that are newly detected after the execution of focusing and basedon a movement detection result detected by the movement detector.
 2. Theautomatic focusing apparatus according to claim 1, wherein there-execution determination unit does not re-execute focusing if avariation amount of the second focus detection result newly detectedafter the execution of focusing with respect to the second focusdetection result in an in-focus state is equal to or smaller than afirst predetermined value.
 3. The automatic focusing apparatus accordingto claim 1, wherein the re-execution determination unit re-executesfocusing if the variation amount of the second focus detection resultnewly detected after the execution of focusing with respect to thesecond focus detection result in an in-focus state is greater than afirst predetermined value, and a variation amount of the first focusdetection result newly detected after the execution of focusing withrespect to the first focus detection result in the in-focus state isgreater than a second predetermined value.
 4. The automatic focusingapparatus according to claim 1, wherein the re-execution determinationunit does not re-execute focusing if the variation amount of the secondfocus detection result newly detected after the execution of focusingwith respect to the second focus detection result in an in-focus stateis greater than a first predetermined value, the variation amount of thefirst focus detection result newly detected after the execution offocusing with respect to the first focus detection result in thein-focus state is equal to or smaller than a second predetermined value,and the movement detector detects the movement of the object withcomponents in the perpendicular direction.
 5. The automatic focusingapparatus according to claim 1, wherein the re-execution determinationunit re-executes focusing if the variation amount of the second focusdetection result newly detected after the execution of focusing withrespect to the second focus detection result in an in-focus state isgreater than a first predetermined value, the variation amount of thefirst focus detection result newly detected after the execution offocusing with respect to the first focus detection result in thein-focus state is equal to or smaller than a second predetermined value,the movement detector does not detect the movement of the object withcomponents in the perpendicular direction, and the variation amount ofthe second focus detection result newly detected after the execution offocusing with respect to the second focus detection result in thein-focus state is greater than a third predetermined value.
 6. Theautomatic focusing apparatus according to claim 1, wherein there-execution determination unit does not re-execute focusing if thevariation amount of the second focus detection result newly detectedafter the execution of focusing with respect to the second focusdetection result in an in-focus state is greater than a firstpredetermined value, the variation amount of the first focus detectionresult newly detected after the execution of focusing with respect tothe first focus detection result in the in-focus state is equal to orsmaller than a second predetermined value, the movement detector doesnot detect the movement of the object with components in theperpendicular direction, and the variation amount of the second focusdetection result newly detected after the execution of focusing withrespect to the second focus detection result in the in-focus state isequal to or smaller than a third predetermined value.
 7. The automaticfocusing apparatus according to claims 1, wherein the movement detectordetermines that the object has moved with components in theperpendicular direction when coordinates of a maximum value ofbrightness indicated by waveforms for calculating the phase differencechange.
 8. The automatic focusing apparatus according to claims 1,wherein the movement detector determines that the object has moved withcomponents in the perpendicular direction when coordinates of centers ofgravity of the waveforms for calculating the phase difference change. 9.The automatic focusing apparatus according to claim 1, wherein themovement detector determines whether the object has moved withcomponents in the direction perpendicular to the optical axis based onthe phase difference obtained by applying correlation computing to thewaveforms at a plurality of different times.
 10. A lens apparatuscomprising the automatic focusing apparatus according to claim 1.